using System.Collections.ObjectModel;
using System.ComponentModel;
using Triton.Bot.Settings;
using Triton.Common;
using Triton.Game.Mapping;

namespace Triton.Bot
{
	public class CustomDeckCache : JsonSettings
	{
		private long long_0;

		private string string_1;

		private string string_2;

		private FormatType formatType;

		private ObservableCollection<string> observableCollection_0;

		public FormatType FormatType
		{
			get
			{
				return formatType;
			}
			set
			{
				if (!value.Equals(formatType))
				{
					formatType = value;
					NotifyPropertyChanged(() => FormatType);
				}
			}
		}

		public long DeckId
		{
			get
			{
				return long_0;
			}
			set
			{
				if (!value.Equals(long_0))
				{
					long_0 = value;
					NotifyPropertyChanged(() => DeckId);
				}
			}
		}

		[DefaultValue("")]
		public string Name
		{
			get
			{
				return string_1;
			}
			set
			{
				if (!value.Equals(string_1))
				{
					string_1 = value;
					NotifyPropertyChanged(() => Name);
				}
			}
		}

		[DefaultValue("")]
		public string HeroCardId
		{
			get
			{
				return string_2;
			}
			set
			{
				if (!value.Equals(string_2))
				{
					string_2 = value;
					NotifyPropertyChanged(() => HeroCardId);
				}
			}
		}

		public ObservableCollection<string> CardIds
		{
			get
			{
				return observableCollection_0;
			}
			set
			{
				if (!value.Equals(observableCollection_0))
				{
					observableCollection_0 = value;
					NotifyPropertyChanged(() => CardIds);
				}
			}
		}

		public static string GetFileNameFor(long id)
		{
			return JsonSettings.GetSettingsFilePath(Configuration.Instance.Name, "CustomDecks", $"{id}.json");
		}

		public CustomDeckCache(long id)
			: base(GetFileNameFor(id))
		{
			if (observableCollection_0 == null)
			{
				observableCollection_0 = new ObservableCollection<string>();
			}
			if (string_1 == null)
			{
				string_1 = "";
			}
			if (string_2 == null)
			{
				string_2 = "";
			}
		}
	}
}
